
Public Class QuoteConditionFieldInfo
	Inherits FieldInfo

	Public Overrides ReadOnly Property ClrType() As Type
		Get
		Return GetType(String())
		End Get
	End Property
	Public Overrides ReadOnly Property FixType() As FixDataType
		Get
		Return FixDataType.MultipleValueString
		End Get
	End Property
	Public Overrides ReadOnly Property TagNumber() As Integer
		Get
		Return 276
		End Get
	End Property
	Public Overrides ReadOnly Property FieldName() As String
		Get
		Return "QuoteCondition"
		End Get
	End Property

	Private ReadOnly s_ValidValues As new ObjectModel.ReadOnlyCollection(Of String)( New String(){"A","B","C","D","E","F","G","H","I"})

Public Const [OpenActive] As String = "A"
Public Const [ClosedInactive] As String = "B"
Public Const [ExchangeBest] As String = "C"
Public Const [ConsolidatedBest] As String = "D"
Public Const [Locked] As String = "E"
Public Const [Crossed] As String = "F"
Public Const [Depth] As String = "G"
Public Const [FastTrading] As String = "H"
Public Const [NonFirm] As String = "I"

Public Function GetValidValues() As ObjectModel.ReadOnlyCollection(Of String)
Return s_ValidValues
End Function

Public Function IsDefined(value As String) As Boolean
Return s_ValidValues.Contains(value)
End Function

Public Function GetName(ByVal value As String) As String
Select Case value
Case "A" : Return "OpenActive"
Case "B" : Return "ClosedInactive"
Case "C" : Return "ExchangeBest"
Case "D" : Return "ConsolidatedBest"
Case "E" : Return "Locked"
Case "F" : Return "Crossed"
Case "G" : Return "Depth"
Case "H" : Return "FastTrading"
Case "I" : Return "NonFirm"
Case Else : Throw New ArgumentOutOfRangeException("value")
End Select
End Function

Public Function GetValue(ByVal name As String) As String
Select Case name
Case "OpenActive" : Return "A"
Case "ClosedInactive" : Return "B"
Case "ExchangeBest" : Return "C"
Case "ConsolidatedBest" : Return "D"
Case "Locked" : Return "E"
Case "Crossed" : Return "F"
Case "Depth" : Return "G"
Case "FastTrading" : Return "H"
Case "NonFirm" : Return "I"
Case Else : Throw New ArgumentOutOfRangeException("name")
End Select
End Function

Public Function AreAllDefined(value As String) As Boolean
Dim words = value.Split(New String() {" "}, StringSplitOptions.RemoveEmptyEntries)
Return AreAllDefined(words)
End Function

Public Function AreAllDefined(ParamArray values() As String) As Boolean
For Each word In values
If Not IsDefined(word) Then Return False
Next
Return True
End Function




End Class


